//
//  ToDo.swift
//  ToDoList
//
//  Created by Qingke on 16/4/13.
//  Copyright © 2016年 Qingke. All rights reserved.
//

import UIKit

class Task: NSObject,NSCoding{
    
    var name: String = ""
    var IsChecked:Bool = false

    func encodeWithCoder(aCoder: NSCoder) {
        aCoder.encodeObject(name, forKey: "name")
        aCoder.encodeBool(IsChecked, forKey: "isChecked")
    }
    override init() {
        super.init()
    }
    required init?(coder aDecoder: NSCoder) {
        super.init()
        self.name = aDecoder.decodeObjectForKey("name") as! String
        self.IsChecked = aDecoder.decodeBoolForKey("isChecked") 
    }
}
